/*
 * Copyright (c) 2010, Nikolaus Moll
 * All rights reserved.
 */
package net.miblounge.gradecalculator.guicommon.util;

import com.trolltech.qt.gui.QAction;
import com.trolltech.qt.gui.QWidget;

public final class ActionUtil {
	private ActionUtil()
	{
	}
	
	public static QAction createAction(final QWidget parent, final String text, final String action, final String statustext)
	{
		final QAction result = new QAction(text, parent);
		if (!action.equals("")) {
			result.triggered.connect(parent, action);
		}
	    result.setStatusTip(statustext);
	    return result;
	}
}
